<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="test">
    </div>
    <script>
        var test=document.getElementById("test");
        var xhr = new XMLHttpRequest();
        var url="https://www.easy-mock.com/mock/5b3ae098d294426e05198b4e/getTest";
        xhr.open("get",url);
        xhr.send();
        xhr.onreadystatechange=function(){
            if(xhr.readyState==4&&xhr.status==200){
              var txt=JSON.parse(xhr.responseText).data.content; 
              console.log(txt);
              test.innerHTML=txt;
            }
        }
    </script>
</body>

</html>